package ch7oopexer1;

public class ZhanDouJi extends  Plane{//战斗机有弹头数，自重，飞行高度等属性。
    private int num;

    public ZhanDouJi() {
    }

    public ZhanDouJi(double weight, double height, int num) {
        super(weight, height);
        this.num = num;
    }

    //但是过程不同；战斗机还有
    //发射导弹，低空盘旋等方法；
    public void run(){
        System.out.println("战斗机起飞");
    }
    public void land (){
        System.out.println("战斗机降落");
    }
    public void launch(){
        System.out.println("战斗机发射导弹");
    }
    public void hover(){
        System.out.println("战斗机盘旋");
    }

    public void show(){
        super.show();
        System.out.println("搭载的炸弹数："+num);
    }


}
